﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace ExcelUtilities.Cfg
{
    /// <summary>
    /// 工作表 配置信息
    /// </summary>
    public class Worksheet
    {
        /// <summary>
        /// 工作表名
        /// </summary>
        [XmlAttribute]
        public string Name { get; set; }
        /// <summary>
        /// 工作表序号（从1开始）
        /// </summary>
        [XmlAttribute]
        public int Order { get; set; }
        /// <summary>
        /// 工作表名（对应excel的工作表名）
        /// </summary>
        [XmlAttribute]
        public string SheetName { get; set; }

        Bag<Range> _range = new Bag<Range>();
        /// <summary>
        /// 区域配置信息集合
        /// </summary>
        [XmlElement("Range")]
        public Bag<Range> Ranges
        {
            get
            {
                return _range;
            }
            set
            {
                _range = value;
            }
        }

        Bag<Cell> _cells = new Bag<Cell>();
        /// <summary>
        /// 单元格配置信息集合
        /// </summary>
        [XmlElement("Cell")]
        public Bag<Cell> Cells
        {
            get
            {
                return _cells;
            }
            set
            {
                _cells = value;
            }
        }
    }
}